<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Hello World!</title>
    <link href="../css/mine.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript">
        function  tosub() {
            //设置隐藏域的值
            document.getElementById("mymethod").value="delete";
            //提交表单
            //  document.getElementById("myform").submit();
            document.forms[1].submit();
        }
        function todaochu() {
            document.getElementById("mymethod").value="daochu";
            //提交表单
            document.forms[1].submit();
        }
    </script>
</head>
<body>
<style>
    .tr_color{background-color: #9F88FF}
</style>
<div class="div_head">
            <span>
                <span style="float: left;">当前位置是：商机信息列表</span>
                <span style="float: right; margin-right: 8px; font-weight: bold;">
                    <span onclick="todaochu()" style="color: blue; cursor: pointer">【导出数据】</span>
                    <a style="text-decoration: none;" href="/addshop">【添加】</a></span>
                    <span onclick="tosub()" style="color: blue; cursor: pointer">【删除】</span>
                </span>
            </span>
</div>
<div></div>
<div class="div_search">
            <span>
                <form action="/findallshop" method="post">
				机构名称:<input type="text" name="shopname" value="${shopname}"  />
				机构级别	<input type="text" name="level"  value="${level}" />
                    <input value="查询" type="submit" />
                    <a href="/addshop">新增商机</a>
                </form>
            </span>
</div>
<div style="font-size: 13px; margin: 10px 5px;">
    <form  id="myform" action="/deleteshops" method="post">
        <input type="hidden" name="method" id="mymethod">
        <table class="table_a" border="1" width="100%">
            <tbody>
            <tr style="font-weight: bold;">
                <td width="30px;"><input type="checkbox" /></td>
                <td width="70px;">编号</td>
                <td width="70px;">机构名称</td>
                <td width="70px;">机构级别</td>
                <td width="70px;">阶段状态</td>
                <td width="70px;">跟进状态</td>
                <td width="70px;">经办人</td>
                <td width="70px;">联系人</td>
                <td width="70px;">审核状态</td>
                <td align="center" width="80px;">操作</td>
            </tr>
            <#list shops.list as shop>
                <tr id="product1">
                    <td><input type="checkbox"  name="sid" value="${shop.sid?c}"/></td>
                    <td>${shop.sid?c}</td>
                    <td>${shop.shopname}</td>
                    <td>${shop.level}</td>
                    <td>${shop.stagestate}</a></td>
                    <td>${shop.followstatus}</td>
                    <td>${shop.operator}</td>
                    <td>${shop.contact}</td>
                    <td>${(shop.resultstatus==1)?string('已审核','未审核')}</td>
                    <td>
                        <a href="/findbysid?sid=#{shop.sid}">修改</a>
                        <a href="/deleteshop?sid=${shop.sid}">删除</a>
                    </td>
                </tr>
            </#list>

            <tr>
                <td colspan="20" style="text-align: center;">
                    <a style="text-decoration: none;" href="/findallshop?shopname=${shopname}&level=${level}">首页</a>
                    <#if shops.hasPreviousPage>
                    <a style="text-decoration: none;" href="/findallshop?pageindex=${shops.prePage}&shopname=${shopname}&level=${level}">上一页</a>
                    </#if>
                    <#if shops.hasNextPage>
                    <a style="text-decoration: none;" href="/findallshop?pageindex=${shops.nextPage}&shopname=${shopname}&level=${level}">下一页</a>
                    <a style="text-decoration: none;" href="/findallshop?pageindex=${shops.pages}&shopname=${shopname}&level=${level}">尾页</a>
                    </#if>
                    共${shops.total}条  ${shops.pageNum}/${shops.pages}
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
</body>
</html>